package com.xiaoma.thread.join;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author maj
 * @ClassName Add
 * @Description
 * @date 2020-09-13 14:06
 */
public class Add implements Runnable{


  private AtomicInteger count=new AtomicInteger(0);

  @Override
  public void run() {
    System.out.println("当前线程："+Thread.currentThread().getName());
    for(int i=0;i<10;i++) {
      count.incrementAndGet();
    }

  }
  public AtomicInteger getCount() {
    return count;
  }

}
